import os
import struct

data_dir_ = "/data/KRS-S/data/"
files = os.listdir(data_dir_)

count = 0
for file in files:
    f = open(data_dir_ + file, "rb")

    while True:
        x_str = f.read(4)
        if x_str == b'':
            break
        y_str = f.read(4)
        z_str = f.read(4)
        z_str = f.read(4)

        count += 1
    f.close()

print(count)
